package com.ruoyi.supplier.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.supplier.mapper.TbBankOutcomeMapper;
import com.ruoyi.supplier.domain.TbBankOutcome;
import com.ruoyi.supplier.service.ITbBankOutcomeService;

/**
 * 出账类别Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-08-14
 */
@Service
public class TbBankOutcomeServiceImpl implements ITbBankOutcomeService 
{
    @Autowired
    private TbBankOutcomeMapper tbBankOutcomeMapper;

    /**
     * 查询出账类别
     * 
     * @param id 出账类别ID
     * @return 出账类别
     */
    @Override
    public TbBankOutcome selectTbBankOutcomeById(Long id)
    {
        return tbBankOutcomeMapper.selectTbBankOutcomeById(id);
    }

    /**
     * 查询出账类别列表
     * 
     * @param tbBankOutcome 出账类别
     * @return 出账类别
     */
    @Override
    public List<TbBankOutcome> selectTbBankOutcomeList(TbBankOutcome tbBankOutcome)
    {
        return tbBankOutcomeMapper.selectTbBankOutcomeList(tbBankOutcome);
    }

    /**
     * 新增出账类别
     * 
     * @param tbBankOutcome 出账类别
     * @return 结果
     */
    @Override
    public int insertTbBankOutcome(TbBankOutcome tbBankOutcome)
    {
        tbBankOutcome.setCreateTime(DateUtils.getNowDate());
        return tbBankOutcomeMapper.insertTbBankOutcome(tbBankOutcome);
    }

    /**
     * 修改出账类别
     * 
     * @param tbBankOutcome 出账类别
     * @return 结果
     */
    @Override
    public int updateTbBankOutcome(TbBankOutcome tbBankOutcome)
    {
        tbBankOutcome.setUpdateTime(DateUtils.getNowDate());
        return tbBankOutcomeMapper.updateTbBankOutcome(tbBankOutcome);
    }

    /**
     * 批量删除出账类别
     * 
     * @param ids 需要删除的出账类别ID
     * @return 结果
     */
    @Override
    public int deleteTbBankOutcomeByIds(Long[] ids)
    {
        return tbBankOutcomeMapper.deleteTbBankOutcomeByIds(ids);
    }

    /**
     * 删除出账类别信息
     * 
     * @param id 出账类别ID
     * @return 结果
     */
    @Override
    public int deleteTbBankOutcomeById(Long id)
    {
        return tbBankOutcomeMapper.deleteTbBankOutcomeById(id);
    }
}
